function ceshiReducer(preState = 0, action) {
  // state默认值为0
  let { type, data } = action; // 获取action类型和传递来的数据
  if (type === 'ceshi') {
    preState = preState + data;
    return preState; // 返回新的状态
  }
  return preState;
}
export default ceshiReducer;
